/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.action;

import com.dao.Usermanager;
import com.entity.Student;
import com.opensymphony.xwork2.ActionSupport;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;

/**
 *
 * @author DELL
 */
public class LookMessage extends ActionSupport{
    
    public LookMessage() {
    }
    
    public String execute() throws Exception {
        HttpServletRequest request;
        request =ServletActionContext.getRequest();
                HttpSession session=request.getSession();
        String sno =(String)session.getAttribute("sno");
        if (sno!=null) {
                    Usermanager  user=new Usermanager();
        
        
        Student st=user.getStudent1(sno);
        session.setAttribute("student", st);
        return SUCCESS;
        }
        else {
        
        return INPUT;
        }
    }
    
}
